public class LabelBreak {
    public static void main(String[] args) {
        final int a = 10;
        //final修饰变为中止量，不能被修改
        int m = 0, k = 0;
        while (true) {
            a:
            {
                m = (int) (Math.random() * 10);
                if (m % 2 != 0) {
                    break a;
                    //跳出标签a，未跳出循环
                }
                System.out.println(m);
                k++;
                if (k == 5) {
                    break;
                }
            }
        }
        System.out.println("循环结束");
    }
}